<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>微信登录检查</title>
</head>
<body>
正在登录，请稍后...
<script>
    // Read a page's GET URL variables and return them as an associative array.
    function getUrlVars() {
        var vars = {}, hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes[i].split('=');
            vars[hash[0]] = hash[1];
        }
        return vars;
    }
    const params = getUrlVars();
    console.log(params);
    const code=params["code"];
    const state=params["state"];
    const url=decodeURIComponent(state)+code;
    console.log(url);
    window.location.href=url;//跳转到页面中处理
</script>
</body>
</html>